package com.example.demo.global.response;

import java.time.LocalDateTime;

import com.example.demo.global.test.ConstValue;

import lombok.Data;

@Data
public class ResponseVo {
    private int code;
    private String msg;
    private String responseTime;
    private Object data;

    private ResponseVo(ResponseCode respCode) {
        this.code = respCode.getCode();
        this.msg = respCode.getMsg();
        this.responseTime = LocalDateTime.now().format(ConstValue.FORMATTER);
    }

    public ResponseVo(ResponseCode respCode, Object data) {
        this(respCode);
        this.data = data;
    }
}
